package service;

import entity.ResponseMessage;
import entity.Storehouse;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
public interface WarehouseService {
    /**
     * 查询所有的仓库
     * 在有条件的情况下 type 根据仓库类型进行查询
     * @param storehouse
     * @param pageNo
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "/storehouse/findAllStorehouse")
    @ResponseBody
    public ResponseMessage findAllStorehouse(@RequestBody(required=false) Storehouse storehouse, @RequestParam("pageNo") int pageNo,@RequestParam("pageSize") int pageSize);

    /**
     * 根据id查询商品信息
     * @param id
     * @return
     */
    @RequestMapping("/storehouse/getidStorehouse")
    @ResponseBody
    public ResponseMessage getidStorehouse(@RequestParam("id") String id);

    /**
     * 根据id修改仓库信息
     * @param storehouse
     * @return
     */
    @RequestMapping("/storehouse/xgStorehouse")
    @ResponseBody
    public ResponseMessage xgStorehouse(@RequestBody Storehouse storehouse);

    /**
     * 查询总仓库
     * @return
     */
    @RequestMapping("/storehouse/getQueryStronger")
    @ResponseBody
    public ResponseMessage getQueryStronger();

    /**
     * 新增仓库
     * @param storehouse
     * @return
     */
    @RequestMapping("/storehouse/insertStronger")
    @ResponseBody
    public ResponseMessage insertStronger(@RequestBody Storehouse storehouse);
}
